package com.github.kennylee26.javaee.mvc.utils;

import org.springframework.core.io.ClassPathResource;

import java.io.File;
import java.io.IOException;

/**
 * <b>类名称：</b>ResourceUtils<br/>
 * <b>类描述：</b> 资源工具类 <br/>
 * <b>备注：</b><br/>
 *
 * @author kennylee <br />
 * @version 1.0.0 <br/>
 */
public class ResourceUtils {

    /**
     * <p>获取头像文件</p>
     *
     * @return File
     */
    public static File getAvatarFile() {
        try {
            return new ClassPathResource("static/avatar.jpg").getFile();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}
